package com.jr.serviceimpl;

import com.jr.dao.EnterpriseDao;
import com.jr.daoimpl.EnterpriseDaoImpl;
import com.jr.entity.Enterprise;
import com.jr.pojo.SocialCode;
import com.jr.service.EnterpriseService;

import java.util.ArrayList;

public class EnterpriseServiceImpl implements EnterpriseService {

    EnterpriseDao enterpriseDao = new EnterpriseDaoImpl();

    @Override
    public boolean addEnterprise(String enamess, String social_uniform_code, String email, String ephone, String address, String scale, String fax) {
        return enterpriseDao.addEnterprise(enamess,social_uniform_code,email,ephone,address,scale,fax)>0;
    }

    @Override
    public Enterprise selectAll(String enamess) {
        return enterpriseDao.selectAll(enamess);
    }


    @Override
    public ArrayList<SocialCode> findCode() {
        return enterpriseDao.selectCode();
    }


    @Override
    public ArrayList selectAllName(int eid) {
        return enterpriseDao.selectAllName(eid);
    }
}
